package designpattern.strategy.order;

import java.math.BigDecimal;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 刘牌
 * @Date: 2021/12/21/16:44
 * @Description:
 */
public class OrderDiscountContext<T> {

    IOrderDiscountStrategy<T> orderDiscountStrategy;

    public OrderDiscountContext(IOrderDiscountStrategy<T> orderDiscountStrategy){
        this.orderDiscountStrategy = orderDiscountStrategy;
    }

    public BigDecimal discount(T t , BigDecimal totalMoney){
        return this.orderDiscountStrategy.discount(t,totalMoney);
    }
}
